#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n;
	scanf("%d",&n);
	int x,y,z;
	int X = 0,Y = 0,Z = 0;
	for(int i = 0;i<n;i++)
	{
		scanf("%d %d %d",&x,&y,&z);
		X += x;
		Y += y;
		Z += z;
	}
	if(!X && !Y && !Z) printf("YES\n");
	else printf("NO\n");
}
